From: Alan Mackenzie Date: Tue, 19 Oct 2010 20:18:35 +0000 (+0000) Subject: cc-mode.el (c-before-change, c-after-change): Move the setting of X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~6040 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=86a2578674ee8641584edc402add6412768371a7;p=emacs.git cc-mode.el (c-before-change, c-after-change): Move the setting of c-new-BEG and c-new-END from c-before-change to c-after-change. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 438a2bdfe50..d90f0ade896 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-10-19 Alan Mackenzie + + * progmodes/cc-mode.el (c-before-change, c-after-change): Move the + setting of c-new-BEG and c-new-END from c-before-change to + c-after-change. + 2010-10-19 Chong Yidong * cus-face.el (custom-theme-set-faces): Revert 2010-10-18 change. diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 505a5663ebc..9524ff27d24 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1029,10 +1029,6 @@ Note that the style variables are always made local to the buffer." (buffer-substring-no-properties type-pos term-pos) (buffer-substring-no-properties beg end))))))) - ;; (c-new-BEG c-new-END) will be the region to fontify. It may become - ;; larger than (beg end). - (setq c-new-BEG beg - c-new-END end) (if c-get-state-before-change-functions (mapc (lambda (fn) (funcall fn beg end)) @@ -1086,6 +1082,10 @@ Note that the style variables are always made local to the buffer." (when c-recognize-<>-arglists (c-after-change-check-<>-operators beg end)) + ;; (c-new-BEG c-new-END) will be the region to fontify. It may become + ;; larger than (beg end). + (setq c-new-BEG beg + c-new-END end) (if c-before-font-lock-function (save-excursion (funcall c-before-font-lock-function beg end old-len)))))))